import axios from '../api/common.js'
// 添加分配角色获取数据
export const getAllRoleList = () => {
  return axios({
    url: 'roles'
  })
}
// 删除指定角色的指定权限接口方法
export const delRightByRoleId = (roleId, rightId) => {
  return axios({
    method: 'delete',
    url: `roles/${roleId}/rights/${rightId}`
  })
}
// 为角色分配授权的接口方法
export const grantRightForRole = (roleId, rids) => {
  return axios({
    method: 'post',
    url: `roles/${roleId}/rights`,
    data: { rids }
  })
}
